<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../../js/vue.min.js"></script>
</head>
<style>
    [v-cloak] {
        display: none;
    }

</style>
<body>
<div id="app" v-cloak>
    {{reversedText}}
    <span v-once></span>
    <p v-if="status===1">当status为1时显示该行</p>
    <p v-else-if="status===2">当status为2时显示该行</p>
    <p v-else>其他的值显示该行</p>
    <template v-if="ok===1">
        <p>内容</p>
        <p>内容</p>
        <p>内容</p>
    </template>
</div>
</body>
<script>
    var yyf = new Vue({
        el: "#app",
        data: {
            text: '123,456',
            status: 1,
            ok:2
        },
        computed: {
            reversedText: function () {
                return this.text.split(",").reverse().join(",");
            }
        }
    })
</script>
</html>